package org.merak;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.merak.core.model.Identified;
import org.merak.core.text.json.DateStyle;
import org.merak.core.text.json.annotation.JsonDate;

public class Pessoa extends Identified<Integer> {

	//~ Attributes ///////////////////////////////////////////////////////////////
	//****************************************************************************
	private String   nome  = "";
	private int      idade = 0;
	private Date     nascimento = new Date();
	private double   peso  = 0;
	private String[] nomes = null;
	private boolean  jovem = false;
	private Pessoa   mae   = null;
	private Pessoa   filho = null;
	private List<String>       irmaos   = new ArrayList<String>();
	private Map<String,String> parentes = new HashMap<String,String>();

	//~ Constructors /////////////////////////////////////////////////////////////
	//****************************************************************************
	public Pessoa(int id) {
		super(id);
	}

	//~ Methods //////////////////////////////////////////////////////////////////
	//****************************************************************************
	public String getN() {
		return this.nome;
	}
	//****************************************************************************
	public int getIdade() {
		return this.idade;
	}
	//****************************************************************************
	public void setIdade(int idade) {
		this.idade = idade;
	}
	//****************************************************************************
	@JsonDate(dateStyle=DateStyle.SHORT)	
	public Date getNascimento() {
		return this.nascimento;
	}
	//****************************************************************************
	public void setNascimento(Date nascimento) {
		this.nascimento = nascimento;
	}
	//****************************************************************************
	public double getPeso() {
		return this.peso;
	}
	//****************************************************************************
	public void setPeso(double peso) {
		this.peso = peso;
	}
	//****************************************************************************
	public void setSexo(char idade) {

	}
	//****************************************************************************
	public char getSexo() {
		return 'M';
	}
	//****************************************************************************
	public Character getEstadoCivil() {
		return 'S';
	}
	//****************************************************************************
	public String[] getNomes() {
		return this.nomes;
	}
	//****************************************************************************
	public void setNomes(String[] nomes) {
		this.nomes = nomes;
	}
	//****************************************************************************
	public boolean isJovem() {
		return this.jovem;
	}
	//****************************************************************************
	public void setJovem(boolean jovem) {
		this.jovem = jovem;
	}
	//****************************************************************************
	public void setNome(String nome) {
		this.nome = nome;
	}
	//****************************************************************************
	public Pessoa getMae() {
		return this.mae;
	}
	//****************************************************************************
	public void setMae(Pessoa mae) {
		this.mae = mae;
	}
	//****************************************************************************
	public void addIrmao(String nome) {
		this.irmaos.add(nome);
	}
	//****************************************************************************
	public void addParente(String nome,String relation) {
		this.parentes.put(nome,relation);
	}
	//****************************************************************************
	public List<String> getIrmaos() {
		return this.irmaos;
	}
	//****************************************************************************
	public Map<String,String> getParents() {
		return this.parentes;
	}
	public Pessoa getFilho() {
		return this.filho;
	}
	public void setFilho(Pessoa filho) {
		this.filho = filho;
	}
	//****************************************************************************
	public void getTest() {

	}
	//****************************************************************************
}
